<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        position: relative;
      }
      div img {
        width: 100%;
      }
      div span {
        position: absolute;
        right: 0;
        top: 0;
        cursor: pointer;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <img src="./京东广告/luzhou.jpg" alt="" />
      <span>X</span>
    </div>
    <script>
      var span = document.querySelector('span');
      var div = document.querySelector('.box');
      span.onclick = function () {
        div.style.display = 'none';
      };
    </script>
  </body>
</html>
